ownsDoc = function(userId,doc){
	return doc && doc.userId===userId;
}